package com.gzw.dms.adapter;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.gzw.dms.R;
import com.gzw.dms.bean.DriverInfo;
import com.gzw.dms.bean.OrderHistoryInfo;

import java.util.List;

/**
 * Created by Administrator on 2016/9/27.
 */
public class OrderHistoryAdapter extends BaseAdapter{
    private Context mContext;
    private List<OrderHistoryInfo> lsMap;

    public OrderHistoryAdapter(Context _mContext,
                               List<OrderHistoryInfo> _lsMap) {
        this.mContext = _mContext;
        this.lsMap = _lsMap;
    }
    @SuppressLint("ViewHolder")

    @Override
    public View getView(int arg0, View convertView, ViewGroup arg2) {
        // TODO Auto-generated method stub
        // 加载布局文件
        if (convertView == null) {
            convertView = View.inflate(mContext, R.layout.item_map, null);
        }
        TextView tv_text= (TextView) convertView.findViewById(R.id.tv_text);
        tv_text.setText(lsMap.get(arg0).getGoods_arrive_remakes());

        return convertView;
    }

    @Override
    public long getItemId(int arg0) {
        // TODO Auto-generated method stub
        return arg0;
    }

    @Override
    public Object getItem(int arg0) {
        // TODO Auto-generated method stub
        return lsMap.get(arg0);
    }

    @Override
    public int getCount() {
        // TODO Auto-generated method stub
        return lsMap.size();
    }

}
